﻿<%@ Page Title="" Language="C#" MasterPageFile="~/TimKenSite.Master" AutoEventWireup="true"
    CodeBehind="OrderHistory.aspx.cs" Inherits="TimKen.Web.Shop.OrderHistory" %>

<%@ Register Src="../UserControls/UserCenter.ascx" TagName="UserCenter" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Title" runat="server">
    <uc1:UserCenter ID="UserCenter1" runat="server" />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="body" runat="server">
    <form runat="server">
    <script type="text/javascript">
        function deleteMesg() {
            alert("购买成功！");
        }
    </script>
    <div class="histroy_box common_border">
        <ul class="histroy_box_title">
            <h1>
                <%=GetLangString("OrderHistory")%></h1>
        </ul>
        <div class="histroy_div">
            <dl class="histroy_select">
                <dt>
                    <%=GetLangString("SearchCondition")%></dt>
                <dd>
                    <span class="floatright">
                        <%=GetLangString("OrderStatus")%>
                        <asp:DropDownList ID="ddlOrderStatus" runat="server" AutoPostBack="true" AppendDataBoundItems="true">
                        </asp:DropDownList>
                    </span>
                    <%=GetLangString("OrderNo") %><asp:TextBox ID="txtOrderNo" runat="server" class="histroy_inputo"></asp:TextBox>
                </dd>
                <dd>
                    <%=GetLangString("OrderDate")%><asp:TextBox ID="txtCreateDateFrom" runat="server"
                        class="histroy_inputo"></asp:TextBox>-<asp:TextBox ID="txtCreateDateTo" runat="server"
                            class="histroy_inputo"></asp:TextBox></dd>
                <dd>
                    <%=GetLangString("TotalAmount")%><asp:TextBox ID="txtTotalAmountFrom" runat="server"
                        class="histroy_inputo"></asp:TextBox>-<asp:TextBox ID="txtTotalAmountEnd" runat="server"
                            class="histroy_inputo"></asp:TextBox></dd>
                <dd>
                    <%=GetLangString("ItemCode")%><asp:TextBox ID="txtItemCode" runat="server" class="histroy_inputo"></asp:TextBox></dd>
                <dd>
                    <%=GetLangString("DetailDescription")%><asp:TextBox ID="txtContent" runat="server"
                        class="histroy_inputo"></asp:TextBox></dd>
                <dd style="border-bottom: none; padding-left: 80px;">
                    <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="../Common/Image/iconbtnbg/lsddss_btn.gif"
                        OnClick="ImageButton1_Click" />
                </dd>
            </dl>
            <ul class="histroy_result">
                <asp:Repeater ID="repOrderList" runat="server" OnItemCommand="repOrderList_ItemCommand">
                    <HeaderTemplate>
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <th scope="col" colspan="8" style="text-align: left; padding-left: 10px;">
                                    <%#GetLangString("selectList")%>
                                </th>
                            </tr>
                            <tr>
                                <th scope="col">
                                    <%#GetLangString("OrderNo")%>
                                </th>
                                <th scope="col">
                                    <%#GetLangString("OrderDate") %>
                                </th>
                                <th scope="col">
                                    <%#GetLangString("TotalAmount")%>
                                </th>
                                <th scope="col">
                                    <%#GetLangString("OrderStatus")%>
                                </th>
                                <th scope="col">
                                    <%#GetLangString("ContactPerson")%>
                                </th>
                                <th scope="col">
                                    <%#GetLangString("ContractStatus")%>
                                </th>
                                <th scope="col">
                                    <%#GetLangString("ConBy")%>
                                </th>
                                <th scope="col">
                                    <%#GetLangString("Operation")%>
                                </th>
                            </tr>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <tr>
                            <td>
                                <%#Eval("OrderNo")%>
                            </td>
                            <td>
                                <%#Eval("CreateDate")%>
                            </td>
                            <td>
                                <%#decimal.Round(decimal.Parse(Eval("TotalAmount").ToString()), 2).ToString()%>
                                RMB
                            </td>
                            <td>
                                <%#Eval("Status")%>
                            </td>
                            <td>
                                <%#Eval("ContactPerson")%>
                            </td>
                            <td>
                                <%#Eval("ContractStatus").ToString() !="" ? (Eval("ContractStatus").ToString() == "0" ? GetLangString("ForConfirm") : GetLangString("Confirmed")) : ""%>
                            </td>
                            <td>
                                <code>
                                    <asp:LinkButton ID="lk_gm" runat="server" CommandName="CopyOrder" CommandArgument='<%#Eval("OrderID") %>'> <%#GetLangString("gm")%></asp:LinkButton>
                                </code>
                            </td>
                            <td>
                                <span><a href='../order/OrderShips.aspx?OrderID=<%#Eval("OrderID") %>'>
                                    <%#GetLangString("seeOrder")%></a> </span><a href='../order/OrderPrint.aspx?OrderID=<%#Eval("OrderID") %>'
                                        target="_blank">
                                        <%#GetLangString("printHt")%></a>
                            </td>
                        </tr>
                    </ItemTemplate>
                    <FooterTemplate>
                        </table>
                    </FooterTemplate>
                </asp:Repeater>
            </ul>
            <ux:AspNetPager ID="AspNetPager1" runat="server" Width="95%" ShowPageIndexBox="Always"
                HorizontalAlign="right" EnableTheming="true" AlwaysShow="true" PageIndexBoxType="TextBox"
                ImagePath="/images/" NavigationButtonType="Image" OnPageChanged="AspNetPager1_PageChanged"
                ButtonImageNameExtension="n" CpiButtonImageNameExtension="r" PagingButtonType="Image">
            </ux:AspNetPager>
        </div>
    </div>
    </form>
</asp:Content>
